# coding=utf-8
"""
将脚本放在工程执行后的results文件夹里，执行脚本即可
"""
import os
import time
path = os.getcwd()
destination = r"D:\logs_"+time.strftime("%Y-%m-%d-%H-%M", time.localtime())
os.mkdir(destination)
dirs = [dir for dir in os.listdir(path) if os.path.isdir(dir)]

for dir in dirs:
	log_path = path +os.sep+dir +os.sep + "android_logs"
	new_log_path =  destination+os.sep+dir
	print log_path
	cmd = "robocopy %s %s /E"%(log_path, new_log_path)
	os.popen(cmd)

    